public class DEV521_S99Extensions {
    private ApexPages.StandardController controller;

    public DEV521_S99Extensions(ApexPages.StandardController controller) {
        this.controller = controller;
    }

    public Component.Apex.SectionHeader getHeaderWithDueDateCheck(){
        Component.Apex.SectionHeader sectionHeader = new Component.Apex.SectionHeader();
        
        if(controller.getId()==null){
            Account a = [select id from account limit 1];
            sectionHeader.title = '「?id=レコードID」を指定してください。（例：' + a.id + '）';
        }else{
            Account a = [select name from account where id=:controller.getId()];
            sectionHeader.title = '取引先「' + a.name + '」の責任者';
        }
        return sectionHeader;
    }
}